package com.bdq.content.infrastructure.persistence.mysql.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bdq.content.infrastructure.model.dto.ContentQueryInfraDTO;
import com.bdq.content.infrastructure.persistence.mysql.pojo.Content;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author malei
* @description 针对表【content(内容表)】的数据库操作Service
* @createDate 2024-05-10 17:16:38
*/
public interface ContentService extends IService<Content> {

    /**
     * @param keyword
     * @param pageNo
     * @param pageSize
     * @return
     */
    IPage<Content> contentSearch(String keyword, Integer pageNo, Integer pageSize);

    /**
     * @param infraDTO
     * @return
     */
    IPage<Content> contentQuery(ContentQueryInfraDTO infraDTO);

    /**
     * 分页查询用户发布内容
     *
     * @param userId
     * @param channel
     * @param pageNo
     * @param pageSize
     * @return
     */
    IPage<Content> pageUserPost(Long userId, Integer channel, Integer pageNo, Integer pageSize);
}
